<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Netkk.Models.DownloadModel>" %>
<%@ Import Namespace="Netkk.Core"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Download erstellen</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>Download erstellen</h1>
    <%= Html.ValidationSummary() %>
    <%using (Html.BeginForm("Create", "Download", FormMethod.Post,
                                           new Dictionary<string, object>
                                           {
                                               { "name", "mainform" }, 
                                               { "enctype", "multipart/form-data" }
                                           }))
      { %>
    <dl class="forms">
        <dt>
            <label for="Name">
                Name:</label></dt>
        <dd>
            <%= Html.TextBox("Name") %>
            <%= Html.ValidationMessage("Name", "*") %>
        </dd>
        <dt>
            <label for="NewFile">
                FilePath:</label></dt>
        <dd>
            <input type="file" name="NewFile" id="NewFile" />
            <%= Html.ValidationMessage("NewFile", "*")%>
        </dd>
        <dt class="ta">
            <label for="Description">
                Kurzbeschreibung:</label></dt>
        <dd class="ta">
            <%= Html.TextArea("Description")%>
            <%= Html.ValidationMessage("Description", "*")%>
        </dd>
        <dt></dt>
        <dd>
            <a href="javascript:void(0);" onclick="document.forms['mainform'].submit();" class="save button"><span>Speichern</span></a> 
            <a href="<%=Html.Action("Download", "Index") %>" class="cancel button"><span>Abbrechen</span></a>
        </dd>
    </dl>
    <% } %>
    <script type="text/javascript">
        $(document).ready(function()
        {
            $('#Description').wysiwyg();
        });
    </script>
</asp:Content>
